package com.guonima.controller;

import com.guonima.service.ITestService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : guonima
 * @create : 2017-10-30-23:27
 */
@RestController
public class TestController {

    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private ITestService testService;

    @RequestMapping("/test")
    public String test(@RequestParam String name){
        logger.info("eureka-hystrix-feign has been call {}", name);

        return testService.test(name);
    }
}
